package com.nit.ehcache.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
public class WeatherDto implements Serializable {

	private Long id;
	private String message;
	private int status;


	//空气质量相关evn
	@Data
	public static class AirQuality implements Serializable {
		private String no2;
		private String mp;
		private String pm25;
		private String o3;
		private String so2;
		private String aqi;
		private String pm10;
		private String suggest;//如：各类人群可自由活动",
		private String time;//更新时间":"22:00:00",
		private String co;
		private String quality;//":"优"
	}


	/**
	 * 当天天气拓展
	 */
	@Data
	@JsonInclude(JsonInclude.Include.NON_NULL)
	public static class Expand implements Serializable {
		/**
		 * 湿度
		 */
		private String humidity;
		/**
		 * 天气
		 */
		private String weather;
		//天气类型  如：2
		private Integer weatherType;
		//更新时间
		private String updateTime;
		//体感温度
		private String stemp;
		//风速
		private String windPower;
		//风向
		private String windDirection;

	}


	/**
	 * 小时天气
	 */
	@Data
	public static class Hour implements Serializable {
		/**
		 * 温度
		 */
		private Integer temperature;
		/**
		 * 湿度
		 */
		private String humidity;
		//风速
		private String windPower;
		//风向
		private String windDirection;
		private String weather;
		//天气类型  如：2
		private Integer weatherType;
		//时间 如：201708241900
		private String time;


	}


	/**
	 * 天气预报，一天
	 */
	@Data
	@JsonInclude(JsonInclude.Include.NON_NULL)
	public static class Forecast implements Serializable {

		//日期
		private String date;
		//最高温度，最低温度
		private String high;
		private String low;
		private String ymd;
		private String week;
		//日出 & 日落
		private String sunrise;
		private String sunset;
		//空气质量
		private Integer aqi;
		//白天天气
		private Day day;
		//晚上天气
		private Day night;


		//兼容字段
		//风向
		private String fx;
		//风力
		private String fl;
		//天气类型
		private String type;
		private String notice;


	}

	//白天 & 晚上 天气描述
	@Data
	@JsonInclude(JsonInclude.Include.NON_NULL)
	public static class Day implements Serializable {
		//风速
		private String windPower;
		//风向
		private String windDirection;

		//公告    如："悠悠的云里有淡淡的诗"
		private String notice;
		//天气描述  如：多云
		private String weather;


	}


	/**
	 * 各种指数
	 */
	@Data
	@JsonInclude(JsonInclude.Include.NON_NULL)
	public static class Index implements Serializable {
		//指数图标
		private String icon;
		//指数值          如：较适宜
		private String value;
		//指数名称
		private String name;
		//指数简单描述    如：较适宜晨练
		private String tips;
		//指数详细描述
		private String description;


	}


}


